<?php

declare(strict_types=1);

namespace app\validate\settlement;

use think\Validate;

class StatementValidate extends Validate
{
    protected $rule = [
        'seller_org_id' => 'require|integer|gt:0',
        'period_start' => 'require|dateFormat:Y-m-d',
        'period_end' => 'require|dateFormat:Y-m-d',
        'order_ids' => 'array',
        'status' => 'in:0,1,2,3,4',
        'paid_amount' => 'float|egt:0',
        'remark' => 'max:255',
    ];

    protected $scene = [
        'create' => ['seller_org_id', 'period_start', 'period_end', 'order_ids', 'remark'],
        'update' => ['status', 'paid_amount', 'remark'],
    ];
}
